package com.ad_hccm.dao.Appendix;

import com.ad_hccm.domain.Appendix.AE;
import com.ad_hccm.domain.Appendix.Eliminate;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * TODO 剔除
 */
@Mapper
public interface EliminateDao {
    @Insert("insert into eliminate value(#{id}, #{date}, #{reason}, #{misdiagnosis}, #{meetsExclusionCriteria}, #{untreated}, #{noDetectionRecord})")
    public boolean save(Eliminate domain);

    @Update("update eliminate set date = #{date}, reason = #{reason}, misdiagnosis = #{misdiagnosis}, meetsExclusionCriteria = #{meetsExclusionCriteria}, untreated = #{untreated}, noDetectionRecord = #{noDetectionRecord} where id=#{id}")
    public boolean update(Eliminate domain);

    @Select("select * from eliminate where id=#{id}")
    public Eliminate getById(String id);

    @Select("select * from eliminate")
    public List<Eliminate> getAll();

    @Delete("delete from eliminate where id=#{id}")
    public boolean delete(String id);
}